from yawSrc.tools.getPlotly import get2dFig, get2dFig
from yawSrc.tools.loadFile import toLineRegressCsv, toAttrCsv, toLineRegressAttrCsv

from common.config import yawConfig as Config



if __name__ == '__main__':
    fig = get2dFig(Config.hisLineRegress)
    fig.show()

    # f1 = np.polyfit(points_maxPower[Config.WindSpeed], points_maxPower[Config.WindDirection], 4)  # 返回多项式系数
    # func = np.poly1d(f1)  # 返回多项式表达式（多项式函数）
    # direction_fit = func(points_maxPower[Config.WindSpeed])
    # df2 = pd.DataFrame({'WindDirection':direction_fit, 'WindSpeed':points_maxPower[Config.WindSpeed]})
    # get2dFig_2(Config.hisLineRegress).show()
    # fig2 = px.line(df2, x='WindDirection', y='WindSpeed', title='偏航误差曲线', range_x=[-6, 6])
    # fig2.show()
